﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace BiaoYinTest
{
    public partial class MainPage : UserControl
    {
        PageInfo pInfo;
        public MainPage()
        {
            InitializeComponent();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            ServiceReference1.WebService1SoapClient wsc = new BiaoYinTest.ServiceReference1.WebService1SoapClient();
            wsc.GetArticCompleted += new EventHandler<BiaoYinTest.ServiceReference1.GetArticCompletedEventArgs>(wsc_GetArticCompleted);
            wsc.GetArticAsync();
        }

        void wsc_GetArticCompleted(object sender, BiaoYinTest.ServiceReference1.GetArticCompletedEventArgs e)
        {
            pInfo = PageInfo.Load(e.Result, 800, 900);
            biaoyin.DataContext = pInfo;
        }

        private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            //biaoyin.UpdateSize(this.ActualWidth - 400, this.ActualHeight);
        }

        private void btTest_Click(object sender, RoutedEventArgs e)
        {
                biaoyin.EditHotArea(!biaoyin.IsInHotEdit);
        }
    }
}
